package chixing.day18.work;

import java.util.Random;

public class Tread1 extends Thread{
    private String employeeName;
    private static final Random random = new Random();
    public Tread1(String employeeName) {
        this.employeeName = employeeName;
    }
    public Tread1() {
    }

    @Override
    public void run() {
        try {
            int sleepTime = random.nextInt(3) + 1;
            Thread.sleep(sleepTime * 1000);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            e.printStackTrace();
        }
        System.out.println("大家好我是" + employeeName);
    }
}

